import request from '@/utils/request';
import qs from 'qs';
// 排班管理
// 查询
export function getDevSn(query) {
  return request({
    url: '/scheduling/personnel/getDevSnSelectedStatus',
    method: 'GET',
    params: query
  });
}
// 获取工序设备号
export function getEquipNumber(query) {
  return request({
    url: '/scheduling/personnel/getEquipmentByGx',
    method: 'GET',
    params: query
  });
}
// 查询人员排班记录
export function getSchedule(query) {
  return request({
    url: '/scheduling/personnel/queryPersonnelClasses',
    method: 'GET',
    params: query,
    paramsSerializer: params => {
      return qs.stringify(params, { indices: false });
    }
  });
}
// 查询人员排班记录-络筒
export function getScheduleLt(query) {
  return request({
    url: '/scheduling/personnel/queryPersonnelClassesLt',
    method: 'POST',
    data: query
  });
}
// 修改人员排班
export function editSchedule(query) {
  return request({
    url: '/scheduling/personnel/modifyPersonnelClasses',
    method: 'POST',
    data: query
  });
}
// 修改人员排班-络筒
export function editScheduleLt(query) {
  return request({
    url: '/scheduling/personnel/modifyPersonnelClassesLt',
    method: 'POST',
    data: query
  });
}
// 移除人员排班
export function delSchedule(query) {
  return request({
    url: '/scheduling/personnel/deletePersonnelClasses',
    method: 'POST',
    data: query
  });
}
// 一键复制昨日排班
export function yesterdaySchedule(query) {
  return request({
    url: '/scheduling/personnel/queryScheduleYesterday',
    method: 'POST',
    data: query
  });
}
// 获取班次信息-班长-班教练
export function getMonitor(query) {
  return request({
    url: '/scheduling/personnel/getShiftInformation',
    method: 'GET',
    params: query
  });
}
// 查询落纱次数
export function getLscs(query) {
  return request({
    url: '/scheduling/personnel/queryMesLscs',
    method: 'POST',
    data: query
  });
}
// 更新落纱次数-批量
export function updateLscsMul(query) {
  return request({
    url: '/scheduling/personnel/updateMesLscsBatch',
    method: 'POST',
    data: query
  });
}
// 更新落纱次数-单次
export function updateLscsSingle(query) {
  return request({
    url: '/scheduling/personnel/updateMesLscsSingle',
    method: 'POST',
    data: query
  });
}
// 查询换粗纱
export function getCsDs(query) {
  return request({
    url: '/scheduling/personnel/queryReplaceInfoCsDs',
    method: 'POST',
    data: query
  });
}
// 更新换粗砂
export function updateCsDs(query) {
  return request({
    url: '/scheduling/personnel/updateReplaceCsDs',
    method: 'POST',
    data: query
  });
}
// 新增人员排班
export function addPerson(query) {
  return request({
    url: '/scheduling/personnel/addPersonnelClasses',
    method: 'POST',
    data: query
  });
}
// 复制到模板
export function copyTemplate(query) {
  return request({
    url: '/scheduling/personnel/copyToSchedulingTemplate',
    method: 'POST',
    data: query
  });
}
// 一键删除
export function delAll(query) {
  return request({
    url: '/scheduling/personnel/oneClickDelete',
    method: 'POST',
    data: query
  });
}
// 查询络筒锭数选择状态
export function getDs(query) {
  return request({
    url: '/scheduling/personnel/getDsSelectedStatus',
    method: 'GET',
    params: query
  });
}
// 修改人员排班络筒锭数
export function editDs(query) {
  return request({
    url: '/scheduling/personnel/modifyDailyPlanLtDs',
    method: 'POST',
    data: query
  });
}
